package example.steps;

import net.thucydides.core.annotations.Step;
import net.thucydides.core.steps.ScenarioSteps;

import org.junit.Assert;

import example.pages.IndexPage;

public class RegistrationSteps extends ScenarioSteps
{
	IndexPage indexPage;

	@Step("Go to Index page")
	public void go_to_index_page()
	{
		indexPage.open();
	}

	@Step("Choose a gender")
	public void set_registration_gender(String p_gender)
	{
		indexPage.set_registration_gender(p_gender);
	}

	@Step("Type an email")
	public void type_registration_email(String p_email)
	{
		indexPage.type_registration_email(p_email);
	}

	@Step("Type a password")
	public void type_registration_password(String p_password)
	{
		indexPage.type_registration_password(p_password);
	}

	@Step("Type a location")
	public void type_registration_location(String p_location)
	{
		indexPage.type_registration_location(p_location);
	}

	@Step("Choose a birth date")
	public void set_birth_date(String p_day, String p_month, String p_year)
	{
		indexPage.set_registration_birth_day(p_day);
		indexPage.set_registration_birth_month(p_month);
		indexPage.set_registration_birth_year(p_year);
	}

	@Step("Try to register")
	public void submit_registration_data()
	{
		indexPage.submit_registration_data();
	}

	@Step("Check for user is on Welcome page")
	public void should_be_welcome_page()
	{
		Assert.assertTrue(indexPage.is_welcome_page());
	}

}